﻿<MenuItem x:Class="CmdletHelpEditor.UI.UserControls.Parts.MenuActions"
		  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
		  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
		  xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
		  xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
		  xmlns:viewModel="clr-namespace:CmdletHelpEditor.API.ViewModel"
		  xmlns:converters="clr-namespace:CmdletHelpEditor.API.Converters"
		  mc:Ignorable="d"
		  d:DataContext="{d:DesignInstance viewModel:MainWindowVM}"
		  Header="_Actions">
	<MenuItem.Resources>
		<converters:MultiParamConverter x:Key="MultiParamConverter" />
	</MenuItem.Resources>
	<MenuItem Header="_Reload Modules"
			  InputGestureText="F5"
			  Command="{Binding CommandManager.LoadModulesCommand}">
		<MenuItem.Icon>
			<Image Source="/Images/Menu/refresh_16x16.png"/>
		</MenuItem.Icon>
	</MenuItem>
	<Separator/>
	<MenuItem Header="Publish XML Help to file"
			  Command="{Binding CommandManager.PublishHelpCommand}">
		<MenuItem.CommandParameter>
			<MultiBinding Converter="{StaticResource MultiParamConverter}">
				<Binding Path="SelectedTab"/>
				<Binding RelativeSource="{RelativeSource FindAncestor, AncestorType={x:Type Window}}"/>
			</MultiBinding>
		</MenuItem.CommandParameter>
		<MenuItem.Icon>
			<Image Source="/Images/Menu/xml_16x16.png"/>
		</MenuItem.Icon>
	</MenuItem>
	<Separator/>
	<MenuItem Header="Import from comment-based help"
			  Command="{Binding CommandManager.ImportFromCBHelpCommand}"
			  CommandParameter="{Binding SelectedModule}"/>
	<MenuItem Header="Import from XML Help file"
			  Command="{Binding CommandManager.ImportFromXmlHelpCommand}"
			  CommandParameter="{Binding SelectedModule}"/>
</MenuItem>
